package com.hm.cms.domain;

import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.hm.cms.auto.su.BaseDomain;
import com.hm.cms.auto.su.R;
import com.hm.cms.def.SiteColumnEnum;

import lombok.Getter;
import lombok.Setter;

/**
 * @author shishun.wang
 * @date 下午1:18:45 2017年10月13日
 * @version 1.0
 * @describe 分类
 */
@Setter
@Getter
@Document(collection = R.Database.prefix + "TERMS")
@CompoundIndexes({ @CompoundIndex(name = "status", def = "{'status':1}"),
		@CompoundIndex(name = "term_name", def = "{'term_name':1}") })
public class TermsDomain extends BaseDomain {

	private static final long serialVersionUID = 8624304966424550949L;

	/**
	 * 站点大类栏目
	 */
	@Field(value = "site_column")
	private SiteColumnEnum siteColumn;

	/**
	 * 分类名称
	 */
	@Field(value = "term_name")
	private String termName;

	/**
	 * 分类CODE
	 */
	@Indexed(unique = true)
	@Field(value = "term_code")
	private String termCode;

	/**
	 * 分类描述
	 */
	@Field(value = "term_note")
	private String termNote;

	/**
	 * 展示顺序
	 */
	@Field(value = "term_order")
	private Integer termOrder;

}
